package com.china.produce.config.es;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2024/7/6
 */
@Configuration
public class ESConfiguration {

    @Bean("restSimpleEsClient")
    public RestClient restClient() {

      return  RestClient.builder(new HttpHost("117.72.96.70", 9200, "http")).build();
    }
}
